package com.lingshu.app.service;

import com.lingshu.app.model.ReturnObject;
import com.lingshu.app.model.enums.ImagePart;
import com.lingshu.app.model.register.RegisterImageChangeRequest;
import com.lingshu.app.model.register.RegisterQaRequest;
import com.lingshu.app.model.register.RegisterQaResponse;
import com.lingshu.app.model.register.RegisterQueryRequest;
import com.lingshu.app.model.register.RegisterQueryResponse;
import com.lingshu.app.model.register.RegisterScreenshotDeleteRequest;
import com.lingshu.app.model.register.RegisterScreenshotResponse;
import com.lingshu.app.model.register.RegisterScreenshotSaveRequest;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;

/**
 * @author 于定金
 * @version 1.0
 * @Date 2023/12/28 15:28
 * @Description
 */
public interface RegisterService {
    /**
     * 分页查询 筛查数据
     *
     * @param request
     * @return
     */
    @POST("api/register/get")
    Observable<ReturnObject<RegisterQueryResponse>> getRegisterList(@Body RegisterQueryRequest request);

    /**
     * 保存截图
     *
     * @param request
     * @return
     */
    @POST("api/screenshot/save")
    Observable<ReturnObject<RegisterScreenshotResponse>> saveScreenshot(@Body RegisterScreenshotSaveRequest request);

    /**
     * 影像质控
     *
     * @param request
     * @return
     */
    @POST("api/register/qa")
    Observable<ReturnObject<RegisterQaResponse>> qa(@Body RegisterQaRequest request);

    /**
     * 上传截图
     *
     * @param file
     * @param imageId
     * @param frameIndex
     * @return
     */
    @Multipart
    @POST("api/screenshot/upload")
    Observable<ReturnObject<RegisterScreenshotResponse>> upload(@Part MultipartBody.Part file, @Part("imageId") RequestBody imageId, @Part("frameIndex") RequestBody frameIndex);

    /**
     * 删除截图
     *
     * @param request
     * @return
     */
    @POST("api/screenshot/delete")
    Observable<ReturnObject<Object>> removeScreenshot(@Body RegisterScreenshotDeleteRequest request);

    /**
     * 修改影像
     * @param request
     * @return
     */
    @POST("api/image/modify")
    Observable<ReturnObject<ImagePart>> changePart(@Body RegisterImageChangeRequest request);
}
